package com.cskaoyan.controller;

import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.bean.vo.AdminRegionVo;
import com.cskaoyan.service.AdminRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yi
 * @date 2022/10/13 20:13
 */
@RestController
@RequestMapping("admin/region")
public class AdminRegionController {
    @Autowired
    AdminRegionService adminRegionService;

    @RequestMapping("list")
    public BaseRespVo list() {
        Integer page = 1;
        Integer limit = 31;
        CommonData<AdminRegionVo> data = adminRegionService.queryRegion(page, limit);
        return BaseRespVo.ok(data, "成功");
    }
}
